<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <div onclick="doit()" id="d1">

    </div> -->
    <button id="b1">按钮</button>
    <script>
        // console.log(event);
        // function doit(){
        //     debugger
        //     // let event = 99
        //     console.log(event)
        // }
        var btn =document.getElementById("b1")
        var dv =document.getElementById('d1')
        // btn.onclick = function(){
        //     // debugger
        //     console.log(event)
        // }
        btn.addEventListener('click',function(){
                // debugger
            console.log(event)})
        // document.getElementsByTagName('button')[0].onclick = function(){
        //     document.getElementById('d1').click()
        //     console.log(6666)
        // }
    </script>
</body>
</html>